
package com.our.dao;

import java.util.Date;
import java.util.List;

import org.apache.ibatis.annotations.Param;
import org.mybatis.spring.annotation.MapperScan;

import com.our.model.Invests;

@MapperScan
public interface InvestsMapper {
    int deleteByPrimaryKey(Integer proId);

    int insert(Invests record);

    int insertSelective(Invests record);

    Invests selectByPrimaryKey(Integer proId);

    int updateByPrimaryKeySelective(Invests record);

    int updateByPrimaryKey(Invests record);
    
    List<Invests> findAll(@Param("firstResult") int firstResult, @Param("maxResults") int maxResults);
  
	Object sumForProTotal(String str);

	Object sumExpectedProfit(String str);


    List<Invests> findInvestByPageSize(int page);
    
    int changeMoney(Invests invest);
    
    long findCount();
    
    List<Invests> findByTypeIdAndPeriods(@Param("investTypeId") int investTypeId,@Param("proPeriods") int proPeriods);

	Integer sumForProOfMonth(@Param("beginTime")Date beginTime,@Param("endTime") Date endTime);

	Double sumExpectedProfitForMonth(@Param("beginTime")Date beginTime, @Param("endTime")Date endTime);
    

    Object sumForInvestOfMonth(String str);

	Object sumForInvestTotal(String str);

}